using System.Text;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing
{
	internal class OracleLpPseudoColumnExpression : OracleLpSimpleExpression
	{
		protected OracleLpPseudoColumnExpressionType m_vPseudoColumnExpressionType;

		protected OracleLpName m_vParentObjectName;

		protected OracleLpName m_vSchemaName;

		protected OracleLpExpression m_vExpression;

		public OracleLpPseudoColumnExpressionType PseudoColumnExpressionType
		{
			get
			{
				return m_vPseudoColumnExpressionType;
			}
			set
			{
				m_vPseudoColumnExpressionType = value;
			}
		}

		public OracleLpName ParentObjectName
		{
			get
			{
				return m_vParentObjectName;
			}
			set
			{
				m_vParentObjectName = value;
			}
		}

		public OracleLpName SchemaName
		{
			get
			{
				return m_vSchemaName;
			}
			set
			{
				m_vSchemaName = value;
			}
		}

		public OracleLpExpression Expression
		{
			get
			{
				return m_vExpression;
			}
			set
			{
				m_vExpression = value;
			}
		}

		public OracleLpPseudoColumnExpression(OracleLpStatementElement parent)
			: base(parent)
		{
			m_vSimpleExpressionType = OracleLpSimpleExpressionType.PSEUDOCOLUMN;
		}

		internal override void ToString(StringBuilder sb)
		{
			base.ToString(sb);
			if (m_vSchemaName == null)
			{
				sb.Append("  Schema: ").Append(m_vSchemaName);
			}
			if (m_vParentObjectName == null)
			{
				sb.Append("  Parent: ").Append(m_vParentObjectName);
			}
			sb.Append("  Type: ").Append(m_vPseudoColumnExpressionType);
		}
	}
}
